|Tools| |Up to Language Overview | |Simple functions in yassl>

Language Overview Button demo


5.2.1 Button demo

This illustrates how to use the interpreter through its applet interface in a couple of ways.

5.2.1.1 Inline scripts

This is convenient when the yassl script is small, and won't run into dificulties with the limitations on HTML attributes.

You will probably find that this applet takes a long time to load the first time, and will occasionally become slow on executing scripts for the first time.

The following piece of html in this document is used to create this button.

<code=yasslApplet.class height=30 width=100>
<param name=yasslInlineCode value="

Button b = new Button;
ButtonLabel(b, 'Hello World');
Add(thisApplet, b);

">
</applet>

5.2.1.2 Separate scripts

This illustrates how to use the interpreter through its applet interface using a script that is loaded separately.

This is necessary when the yassl script becomes larger than 1024 characters, or you need to use characters that are not permitted in attributes. The following piece of html does the same as before, except that the script is loaded separately. This is the html in the document to load this script.

<code=yasslApplet.class height=30 width=100>
<param name=yasslCode value=scripts/makeButton.yas>
</applet>
and the file makeButton.yas.
|Tools| |Up to Language Overview | |Simple functions in yassl>

KB Sriram
Comments, bug reports: kbs@sbktech.org

Revised: Sat May 25 15:41:15 1996
URL: http://www.sbktech.org/yas_but.html